// 导入用户集合
const { Article } = require('../../../model/article');

module.exports = (req, res) => {
  const { id } = req.query
  Article.findByIdAndRemove({_id: id}, (err, row) => {
    if(!err) {
      res.json({
        message: '删除成功!'
      })
    } else {
      res.status(403)
      res.json({
        log: err,
        message: '删除失败！'
      })
    }
  })
}